﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ZhimeiSoft.ShowCall.Server.DAL.Interface;
using System.Reflection;

namespace ZhimeiSoft.ShowCall.Server.Factory
{
    public class DalFactory
    {
        private static readonly string path = @"ZhimeiSoft.ShowCall.Server.DAL";

        private DalFactory()
        {

        }

        public static ICustomerDAL CreateCustomerDal()
        {
            string className = path + ".CustomerDAL";
            return (ICustomerDAL)Assembly.Load(path).CreateInstance(className);
        }

        public static ICustomerServiceItemDAL CreateCustomerServiceItemDal()
        {
            string className = path + ".CustomerServiceItemDAL";
            return (ICustomerServiceItemDAL)Assembly.Load(path).CreateInstance(className);
        }
    }
}
